package com.hl.order.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hl.order.mapper.MerchantBillDetailMapper;
import com.hl.order.domain.MerchantBillDetail;
import com.hl.order.service.IMerchantBillDetailService;

/**
 * 商家收支明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-07
 */
@Service
public class MerchantBillDetailServiceImpl implements IMerchantBillDetailService 
{
    @Autowired
    private MerchantBillDetailMapper merchantBillDetailMapper;

    /**
     * 查询商家收支明细
     * 
     * @param id 商家收支明细主键
     * @return 商家收支明细
     */
    @Override
    public MerchantBillDetail selectMerchantBillDetailById(String id)
    {
        return merchantBillDetailMapper.selectMerchantBillDetailById(id);
    }

    /**
     * 查询商家收支明细列表
     * 
     * @param merchantBillDetail 商家收支明细
     * @return 商家收支明细
     */
    @Override
    public List<MerchantBillDetail> selectMerchantBillDetailList(MerchantBillDetail merchantBillDetail)
    {
        return merchantBillDetailMapper.selectMerchantBillDetailList(merchantBillDetail);
    }

    /**
     * 新增商家收支明细
     * 
     * @param merchantBillDetail 商家收支明细
     * @return 结果
     */
    @Override
    public int insertMerchantBillDetail(MerchantBillDetail merchantBillDetail)
    {
        merchantBillDetail.setCreateTime(DateUtils.getNowDate());
        return merchantBillDetailMapper.insertMerchantBillDetail(merchantBillDetail);
    }

    /**
     * 修改商家收支明细
     * 
     * @param merchantBillDetail 商家收支明细
     * @return 结果
     */
    @Override
    public int updateMerchantBillDetail(MerchantBillDetail merchantBillDetail)
    {
        return merchantBillDetailMapper.updateMerchantBillDetail(merchantBillDetail);
    }

    /**
     * 批量删除商家收支明细
     * 
     * @param ids 需要删除的商家收支明细主键
     * @return 结果
     */
    @Override
    public int deleteMerchantBillDetailByIds(String[] ids)
    {
        return merchantBillDetailMapper.deleteMerchantBillDetailByIds(ids);
    }

    /**
     * 删除商家收支明细信息
     * 
     * @param id 商家收支明细主键
     * @return 结果
     */
    @Override
    public int deleteMerchantBillDetailById(String id)
    {
        return merchantBillDetailMapper.deleteMerchantBillDetailById(id);
    }
}
